#include "whether.h"
#include <qglobal.h>
#include <application.h>
#include <applicationinfo.h>
#include <appoptrainfo.h>

#include <QObject>

#include <QString>
#include <QStringList>

class ApHandler : public QObject
{
    Q_OBJECT
public:
   // ApHandler(QObject *parent = 0):QObject(parent){};
    //~ApHandler(){}
};

class ApplicationEx : public Application{
    Q_OBJECT
public:
    ApplicationEx(QObject *parent = 0):Application(parent){};
    ~ApplicationEx(){}
};

//ApHandler __e;
ApplicationInfo _info;

extern "C" int Q_DECL_EXPORT entry_point(ApplicationInfo** app_info)
{
    _info.type = 0;
    strcpy(_info.entry, "entry_point2");
    *app_info = &_info;
    return 0;
}

extern "C" int Q_DECL_EXPORT entry_point2(AppOptraInfo* oinfo)
{
    oinfo->setName("Whether information");
    Application* a = new Application;
    oinfo->setHandler(a);
    oinfo->setUnique("optra#WhetherMonitor");
    oinfo->setRequiredZones(QStringList() << "communityZone");
    oinfo->setFunctionZones(QStringList() << "systemZone");
    oinfo->setFutureZones(QStringList() << "databaseZone");
    return 0;
}
